提供分页查询行业名称的功能。
功能描述:分页查询行业名称。
GET /api/v1/industry/industryname/page
Query:
Name | Type | Description | Required |
---|---|---|---|
currentPage | int | 页码 | Yes |
pageSize | int | 每页条数(范围:1-50) | Yes |
industryName | string | 行业名称 | No |
cURL example:
curl --location --request GET '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/industry/industryname/page?currentPage=1&pageSize=10&accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
--header 'platform: 3' \
--header 'projectId: {projectId}'
Response example:
{
"data": {
"currentPage": 1,
"pageSize": 10,
"totalCount": 15,
"totalPage": 2,
"content": [
"Some系列",
"test1",
"商业共享",
"商业共享test",
"智慧建筑",
"智能农业",
"智能园区",
"智能城市",
"智能工业",
"智能模板"
]
},
"success": true,
"code": 0,
"msg": null
}
功能描述:分页查询行业物模型模板信息。
GET /api/v1/industry/page
Query:
Name | Type | Description | Required |
---|---|---|---|
currentPage | int | 页码 | Yes |
pageSize | int | 每页条数(范围:1-50) | Yes |
field | string | 行业名称 | No |
cURL example:
curl --location --request GET '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/industry/page?currentPage=1&pageSize=2&accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
--header 'platform: 3' \
--header 'projectId: {projectId}'
Response data:
Name | Type | Description |
---|---|---|
category | string | 品类名称 |
field | string | 行业名称 |
id | int | 物模型的模板ID |
scene | string | 所属场景 |
description | string | 描述信息 |
modified | long | 修改时间 |
Response example:
{
"data": {
"currentPage": 1,
"pageSize": 2,
"totalCount": 387,
"totalPage": 194,
"content": [
{
"category": "some系列",
"field": "Some系列",
"id": 24,
"scene": "Some系列",
"modified": 1593593728536,
"description": ""
},
{
"category": "model2",
"field": "行业test2",
"id": 17,
"scene": "场景test2",
"modified": 1592373524957,
"description": "23213"
}
]
},
"success": true,
"code": 0,
"msg": null
}
功能描述:获取行业物模板下所有功能。
GET /api/v1/industry/{categoryId}/properties
Path:
Name | Type | Description | Required |
---|---|---|---|
categoryId | int | 物模型的模板ID | Yes |
cURL example:
curl --location --request GET '{URI-scheme}://{Endpoint}{path-prefix}/api/v1/industry/116061/properties?accessKeyId={accessKeyId}&signature={signature}&signatureNonce=646' \
--header 'platform: 3' \
--header 'projectId: {projectId}'
Response data:
Name | Type | Description |
---|---|---|
userId | string | 用户ID |
nodeName | string | 节点名称 |
id | int | 行业ID |
category | string | 品类名称 |
categoryId | string | 物模型的模板ID |
class | int | 属性种类 1: 属性, 2: 事件 |
created | long | 创建时间 |
identifier | string | 属性名 |
kind | int | 属性分类 1: 标准, 2: 自定义 |
minimum | number | 参数最小值(数值类型特有) |
maximum | number | 参数最大值(数值类型特有) |
modified | long | 修改时间 |
unit | string | 属性单位 |
required | boolean | 属性是可选还是必选 true: 必选, false: 可选 |
special | struct | 对部分数据类型的补充说明 |
type | int | 数据类型 |
specialString | string | 属性值的说明或限制 |
accessMode | int | 读写模式 |
参数special结构:
Name | Type | Description |
---|---|---|
length | int | string/bytes类型的字符串长度,1~2048 |
step | double | 步长, 设备上传数据间隔, 整型/浮点型类型才有, 分别对应整型、浮点 |
enumArray | struct[] | 枚举或布尔类型的相关信息的数组(布尔类型时元素的key有且仅有0/1,枚举类型时元素的个数不超过20个,key范围0~127) |
参数enumArray结构:
Name | Type | Description |
---|---|---|
key | int | 枚举或布尔类型的值(布尔类型时key有且仅有0/1,枚举类型时key范围0~127) |
describe | string | 值对应的说明 |
Response example:
{
"success": true,
"code": 0,
"msg": null,
"data": [
{
"name": "ddrdr",
"accessMode": 1,
"unit": "",
"minimum": 0,
"maximum": 0,
"specialString": "{\"length\":10}",
"special": {
"length": 10
},
"required": true,
"id": 116466,
"categoryId": 116061,
"created": 1593841255290,
"modified": 1593841255290,
"identifier": "dfer",
"type": 1,
"category": "家居安防",
"class": 1,
"kind": 1
}
]
}
功能描述:根据品类id获取该品类的属性、事件、服务
GET /api/v1/industry/propertyAndAffairAndService/{categoryId}
Path: | Name | Type |Description | Required | | -------------- | ------------------------ | -------- | ------ | | categoryId | int |物模型的模板ID | Yes |
Query:
Name | Type | Description | Required |
---|---|---|---|
productId | int | 产品ID | Yes |
method | string | 查询方式(IN;NIN) | Yes |
cURL example:
curl --location --request GET '{URI-scheme}://{Endpoint}{path-prefix}/api/open/v1/industry/propertyAndAffairAndService/100003?productId=1&method=IN' \
--header 'userInfo: aaaa' \
--header 'projectId: ceaa6546-ec14-4fcb-9700-413570fbed2a' \
--header 'platform: 1' \
Response example:
```
{
"data": {
"industryProperties": [
{
"id": 44802,
"userId": null,
"name": "dddddd1",
"nodeName": null,
"identifier": "ddddd",
"accessMode": 1,
"type": 1,
"unit": "",
"minimum": 0,
"maximum": 0,
"special": {
"length": null,
"precision": null,
"step": null,
"enumArray": null
},
"required": true,
"industryId": null,
"category": "汽车行业-加气",
"categoryId": 100003,
"class": 1
}
],
"industryServices": [
{
"category": "汽车行业-加气",
"categoryId": 100003,
"created": 1612431372374,
"description": "",
"id": 4303,
"identifier": "g",
"modified": 1612431372374,
"name": "gg",
"type": 1,
"inputValue": [
{
"name": "11",
"identifier": "1",
"type": 1,
"minimum": 0.0,
"maximum": 0.0,
"unit": "",
"special": {
"length": 1,
"precision": null,
"step": null,
"enumArray": null
}
}
],
"outputValue": [
{
"name": "yyy",
"identifier": "yyy",
"type": 1,
"minimum": 0.0,
"maximum": 0.0,
"unit": "",
"special": {
"length": 1,
"precision": null,
"step": null,
"enumArray": null
}
}
],
"class": 3
},
{
"category": "汽车行业-加气",
"categoryId": 100003,
"created": 1612431372374,
"description": "",
"id": 4302,
"identifier": "b",
"modified": 1612431372374,
"name": "bb",
"type": 2,
"inputValue": [
{
"name": "11",
"identifier": "1",
"type": 1,
"minimum": 0.0,
"maximum": 0.0,
"unit": "",
"special": {
"length": 1,
"precision": null,
"step": null,
"enumArray": null
}
}
],
"outputValue": [
{
"name": "222",
"identifier": "2",
"type": 1,
"minimum": 0.0,
"maximum": 0.0,
"unit": "",
"special": {
"length": 1,
"precision": null,
"step": null,
"enumArray": null
}
}
],
"class": 3
},
{
"category": "汽车行业-加气",
"categoryId": 100003,
"created": 1612431372374,
"description": "",
"id": 4301,
"identifier": "aa",
"modified": 1612431372374,
"name": "aa",
"type": 1,
"inputValue": [
{
"name": "1",
"identifier": "1",
"type": 1,
"minimum": 0.0,
"maximum": 0.0,
"unit": "",
"special": {
"length": 1,
"precision": null,
"step": null,
"enumArray": null
}
}
],
"outputValue": [
{
"name": "2",
"identifier": "2",
"type": 1,
"minimum": 0.0,
"maximum": 0.0,
"unit": "",
"special": {
"length": 1,
"precision": null,
"step": null,
"enumArray": null
}
}
],
"class": 3
}
],
"industryAffairs": [
{
"category": "汽车行业-加气",
"categoryId": 100003,
"created": 1612431371606,
"id": 116608,
"identifier": "jjjjjjjjjjjjjjjj",
"kind": 0,
"modified": 1612431371606,
"name": "dxdd",
"required": true,
"type": 1,
"value": null,
"valueString": "[{\"name\":\"fff\",\"identifier\":\"fffff\",\"type\":1,\"minimum\":0,\"maximum\":0,\"unit\":\"\",\"special\":{\"length\":1}}]",
"class": 2
},
{
"category": "汽车行业-加气",
"categoryId": 100003,
"created": 1612431371606,
"id": 116607,
"identifier": "11111",
"kind": 0,
"modified": 1612431371606,
"name": "11111",
"required": true,
"type": 1,
"value": null,
"valueString": "[{\"name\":\"aaa\",\"identifier\":\"aaa\",\"type\":1,\"minimum\":0,\"maximum\":0,\"unit\":\"\",\"special\":{\"length\":1}},{\"name\":\"b\",\"identifier\":\"b\",\"type\":1,\"minimum\":0,\"maximum\":0,\"unit\":\"\",\"special\":{\"length\":1}}]",
"class": 2
},
{
"category": "汽车行业-加气",
"categoryId": 100003,
"created": 1612431371606,
"id": 116606,
"identifier": "1",
"kind": 0,
"modified": 1612431371606,
"name": "1",
"required": true,
"type": 1,
"value": null,
"valueString": "[{\"name\":\"11\",\"identifier\":\"1\",\"type\":1,\"minimum\":0,\"maximum\":0,\"unit\":\"\",\"special\":{\"length\":1}},{\"name\":\"2\",\"identifier\":\"2\",\"type\":1,\"minimum\":0,\"maximum\":0,\"unit\":\"\",\"special\":{\"length\":1}}]",
"class": 2
}
]
},
"success": true,
"code": 0,
"msg": null
}
```